package cn.edu.scau.cmi.liweihang.simpleFactoryMethod;


import cn.edu.scau.cmi.liweihang.simpleFactoryMethod.domain.Meat;
import javafx.fxml.FXML;
import javafx.scene.control.ComboBox;
import javafx.scene.control.TextArea;

public class Control {

	
	@FXML
	private TextArea textarea;
	@FXML
	private ComboBox comboBox;
	
	Meat meat=null;
	
	public void production() {
		String name=(String) comboBox.getValue();
		meat=MeatFactory.getMeatName(name);
		textarea.appendText(meat.product()+"\n");
	}
	
}
